#ifndef _MY_CAMERA_H
#define _MY_CAMERA_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/videodev2.h>
#include <sys/mman.h>
#include <poll.h>
#include <pthread.h>

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define BACKLOG 5
#define PERROR(msg) do{perror(msg);exit(-1);}while(0)

#define W 640
#define H 480
int pic_fd;

#define QUESIZE 4		//默认采用4帧缓冲

struct t_buffer{
    void *start;
    size_t length;
};

struct t_buffer send_buffer[QUESIZE];

void *addr[QUESIZE];  	//图片的缓冲地址缓存地址，

void camera_start();


#endif




